import 'package:flutter/material.dart';
import 'package:flutter_plugin/base/widget/base_stateless_widget.dart';
import 'package:get/get.dart';
import 'package:webview_flutter/webview_flutter.dart';

import 'webview_logic.dart';

class WebviewPage extends BaseStatelessWidget<WebviewLogic> {
  WebviewPage({Key? key}) : super(key: key);

  final logic = Get.find<WebviewLogic>();
  final state = Get.find<WebviewLogic>().state;

  @override
  bool showTitleBar() => true;

  @override
  String titleString() => logic.title!;

  @override
  bool setTopBarStyleOrange() => false;

  @override
  Widget buildContent(BuildContext context) {
    return WebViewWidget(controller: logic.controller!);
  }
}
